<!DOCTYPE html>
<html class="sidebar_hover  no-js" lang="en">
    <head>
        <meta charset="ISO-8859-1">
        <title><?php echo "DPD - Distribuição professor e disciplina" ?></title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="">
        <meta name="author" content="">
        <link rel="shortcut icon" href="<?php echo $this->Html->url('/tema/css/images/favicon.png') ?>">
        <!-- Le styles -->
        <?php echo $this->Html->css('/tema/css/twitter/bootstrap.css'); ?>
        <?php echo $this->Html->css('/tema/css/base.css'); ?>
        <?php echo $this->Html->css('/tema/css/twitter/responsive.css'); ?>
        <?php echo $this->Html->css('/tema/css/jquery-ui-1.8.23.custom.css'); ?>
        <?php echo $this->Html->css('/tema/css/style.css'); ?>
        <?php echo $this->Html->css('smart_wizard.css'); ?>
        <?php echo $this->Html->script('/tema/js/plugins/modernizr.custom.32549.js') ?>
        <?php echo $this->Html->script('/tema/js/jquery.js') ?>
        
        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
              <script src="../../../html5shim.googlecode.com/svn/trunk/html5.js"></script>
              <![endif]-->
    </head>

    <body>
        <div id="loading"><img src="<?php echo $this->Html->url('/tema/') ?>img/ajax-loader.gif"></div>
        <div id="responsive_part">
            <div class="logo"> <a href="index.html"><span>Start</span><span class="icon"></span></a> </div>
            <ul class="nav responsive">
                <li>
                    <button class="btn responsive_menu icon_item" data-toggle="collapse" data-target=".overview"> <i class="icon-reorder"></i> </button>
                </li>
            </ul>
        </div>
        <!-- Responsive part -->

        <div id="sidebar" class="">
            <div class="scrollbar">
                <div class="track">
                    <div class="thumb">
                        <div class="end"></div>
                    </div>
                </div>
            </div>
            <div class="viewport ">
                <div class="overview collapse">
                    <div class="search row-fluid container">

                    </div>
                    <ul id="sidebar_menu" class="navbar nav nav-list container full">
                        <li class="accordion-group  color_4 <?php echo ($this->params['controller'] == 'pages') ? 'active' : '' ?>"> <a class="dashboard " href="<?php echo $this->Html->url('/') ?>"><img src="<?php echo $this->Html->url('/tema/') ?>img/menu_icons/dashboard.png"><span>Dashboard</span></a> </li>
                        <?php if(AuthComponent::user('role') != 'teacher'): ?>
                        <li class="accordion-group color_13 <?php echo ($this->params['controller'] == 'Courses') ? 'active' : '' ?>"> <a class="accordion-toggle widgets collapsed " data-toggle="collapse" data-parent="#sidebar_menu" href="#collapse5"> <img src="<?php echo $this->Html->url('/tema/') ?>img/menu_icons/others.png"><span>Cursos</span></a>
                            <ul id="collapse5" class="accordion-body collapse <?php echo ($this->params['controller'] == 'Courses') ? 'in' : '' ?>">
                                <li class="<?php echo ($this->params['controller'] == 'Courses' && $this->params['action'] == 'index') ? 'active' : '' ?>"><?php echo $this->Html->link(__('List Courses'), array('action' => 'index', 'controller' => 'Courses')); ?></li>
                                <li class="<?php echo ($this->params['controller'] == 'Courses' && $this->params['action'] == 'add') ? 'active' : '' ?>"><?php echo $this->Html->link(__('New Course'), array('action' => 'add', 'controller' => 'Courses')); ?></li>
                            </ul>
                        </li>
                        <li class="accordion-group color_13 <?php echo ($this->params['controller'] == 'Teams') ? 'active' : '' ?>"> <a class="accordion-toggle widgets collapsed " data-toggle="collapse" data-parent="#sidebar_menu" href="#collapse6"> <img src="<?php echo $this->Html->url('/tema/') ?>img/menu_icons/others.png"><span>Disciplinas</span></a>
                            <ul id="collapse6" class="accordion-body collapse <?php echo ($this->params['controller'] == 'Teams') ? 'in' : '' ?>">
                                <li class="<?php echo ($this->params['controller'] == 'Teams' && $this->params['action'] == 'index') ? 'active' : '' ?>"><?php echo $this->Html->link(__('List Disciplines'), array('action' => 'index', 'controller' => 'Teams')); ?></li>
                                <li class="<?php echo ($this->params['controller'] == 'Teams' && $this->params['action'] == 'add') ? 'active' : '' ?>"><?php echo $this->Html->link(__('New Discipline'), array('action' => 'add', 'controller' => 'Teams')); ?></li>
                            </ul>
                        </li>
                        <li class="accordion-group color_13 <?php echo ($this->params['controller'] == 'Disciplines') ? 'active' : '' ?>"> <a class="accordion-toggle widgets collapsed " data-toggle="collapse" data-parent="#sidebar_menu" href="#collapse1"> <img src="<?php echo $this->Html->url('/tema/') ?>img/menu_icons/others.png"><span>Turmas</span></a>
                            <ul id="collapse1" class="accordion-body collapse <?php echo ($this->params['controller'] == 'Disciplines') ? 'in' : '' ?>">
                                <li class="<?php echo ($this->params['controller'] == 'Disciplines' && $this->params['action'] == 'index') ? 'active' : '' ?>"><?php echo $this->Html->link(__('List Teams'), array('action' => 'index', 'controller' => 'Disciplines')); ?></li>
                                <li class="<?php echo ($this->params['controller'] == 'Disciplines' && $this->params['action'] == 'add') ? 'active' : '' ?>"><?php echo $this->Html->link(__('New Teams'), array('action' => 'add', 'controller' => 'Disciplines')); ?></li>
                            </ul>
                        </li>
                        <?php endif; ?>
                        <?php if(AuthComponent::user('role') == 'admin'): ?>
                        <li class="accordion-group color_3 <?php echo ($this->params['controller'] == 'Teachers') ? 'active' : '' ?>"> <a class="accordion-toggle widgets collapsed " data-toggle="collapse" data-parent="#sidebar_menu" href="#collapse2"> <img src="<?php echo $this->Html->url('/tema/') ?>img/menu_icons/forms.png"><span>Professores</span></a>
                            <ul id="collapse2" class="accordion-body collapse <?php echo ($this->params['controller'] == 'Teachers') ? 'in' : '' ?>">
                                <li class="<?php echo ($this->params['controller'] == 'Teachers' && $this->params['action'] == 'index') ? 'active' : '' ?>"><?php echo $this->Html->link(__('List Teachers'), array('action' => 'index', 'controller' => 'Teachers')); ?></li>
                                <li class="<?php echo ($this->params['controller'] == 'Teachers' && $this->params['action'] == 'add') ? 'active' : '' ?>"><?php echo $this->Html->link(__('New Teacher'), array('action' => 'add', 'controller' => 'Teachers')); ?></li>
                                <li class="<?php echo ($this->params['controller'] == 'Teachers' && $this->params['action'] == 'managerWorkload') ? 'active' : '' ?>"><?php echo $this->Html->link(__('Manager Workload Teacher'), array('action' => 'managerWorkload', 'controller' => 'Teachers')); ?></li>
                            </ul>
                        </li>
                        <li class="accordion-group color_11 <?php echo ($this->params['controller'] == 'Users') ? 'active' : '' ?>"> <a class="accordion-toggle widgets collapsed " data-toggle="collapse" data-parent="#sidebar_menu" href="#collapse3"> <img src="<?php echo $this->Html->url('/tema/') ?>img/menu_icons/forms.png"><span><?php echo "Usuários" ?></span></a>
                            <ul id="collapse3" class="accordion-body collapse <?php echo ($this->params['controller'] == 'Users') ? 'in' : '' ?>">
                                <li class="<?php echo ($this->params['controller'] == 'Users' && $this->params['action'] == 'index') ? 'active' : '' ?>"><?php echo $this->Html->link(__('List Users'), array('action' => 'index', 'controller' => 'Users')); ?></li>
                                <li class="<?php echo ($this->params['controller'] == 'Users' && $this->params['action'] == 'add') ? 'active' : '' ?>"><?php echo $this->Html->link(__('New User'), array('action' => 'add', 'controller' => 'Users')); ?></li>
                            </ul>
                        </li>
                         <li class="accordion-group color_24 <?php echo ($this->params['controller'] == 'Distributions') ? 'active' : '' ?>"> <a class="accordion-toggle widgets collapsed " data-toggle="collapse" data-parent="#sidebar_menu" href="#collapse4"> <img src="<?php echo $this->Html->url('/tema/') ?>img/menu_icons/forms.png"><span><?php echo "Distribuições" ?></span></a>
                            <ul id="collapse4" class="accordion-body collapse <?php echo ($this->params['controller'] == 'Distributions') ? 'in' : '' ?>">
                                <li class="<?php echo ($this->params['controller'] == 'Distributions' && $this->params['action'] == 'index') ? 'active' : '' ?>"><?php echo $this->Html->link(__('List Distributions'), array('action' => 'index', 'controller' => 'Distributions')); ?></li>
                                <li class="<?php echo ($this->params['controller'] == 'Distributions' && $this->params['action'] == 'add') ? 'active' : '' ?>"><?php echo $this->Html->link(__('New Distribution'), array('action' => 'add', 'controller' => 'Distributions')); ?></li>
                                <li class="<?php echo ($this->params['controller'] == 'DisciplinesTeachers' && $this->params['action'] == 'listWeights') ? 'active' : '' ?>"><?php echo $this->Html->link(__('List choices'), array('action' => 'listWeights', 'controller' => 'DisciplinesTeachers')); ?></li>
                            </ul>
                        </li>
                        <?php endif; ?>
                    </ul>
                    <div class="menu_states row-fluid container ">
                        <h2 class="pull-left"><?php echo "Configurações do menu"; ?></h2>
                        <div class="options pull-right">
                            <button id="menu_state_1" class="color_4" rel="tooltip" data-state ="sidebar_icons" data-placement="top" data-original-title="Icon Menu">1</button>
                            <button id="menu_state_2" class="color_4 active" rel="tooltip" data-state ="sidebar_default" data-placement="top" data-original-title="Menu fixo">2</button>
                            <button id="menu_state_3" class="color_4" rel="tooltip" data-placement="top" data-state ="sidebar_hover" data-original-title="Menu flutuante">3</button>
                        </div>
                    </div>
                    <!-- End sidebar_box --> 

                </div>
            </div>
        </div>
        <div id="main">
            <div class="container">
                <div class="header row-fluid">
                    <div class="top_left">


                        <?php echo $this->Session->flash('flash', array('element' => 'alert')); ?>

                    </div>

                    <div class="top_right">
                        <ul class="nav nav_menu">
                            <li class="dropdown"> <a class="dropdown-toggle administrator" id="dLabel" role="button" data-toggle="dropdown" data-target="#" href="../../page.html">
                                    <div class="title"><span class="name"><?php echo AuthComponent::user('username') ?></span><span class="subtitle"><?php echo $this->Role->isRole(AuthComponent::user('role')) ?></span></div>
                                </a>
                                <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                                    <?php if(AuthComponent::user('role') == 'teacher'): ?>
                                    <li><a href="<?php echo $this->Html->url(array('controller' => 'DisciplinesTeachers', 'action' => 'managerWeight')) ?>"><i class=" icon-list"></i>Atribuir Pesos</a></li>
                                    <li><a href="<?php echo $this->Html->url(array('controller' => 'DisciplinesTeachers', 'action' => 'myChoices')) ?>"><i class=" icon-list"></i>Minhas escolhas</a></li>
                                    <?php endif; ?>
                                    <li><a href="<?php echo $this->Html->url(array('controller' => 'Users', 'action' => 'changePassword')) ?>"><i class=" gicon-edit"></i>Trocar Senha</a></li>
                                    <li><a href="<?php echo $this->Html->url(array('controller' => 'Users', 'action' => 'logout')) ?>"><i class=" icon-unlock"></i>Sair</a></li>
                                </ul>
                            </li>
                        </ul>
                    </div>
                    <!-- End top-right --> 
                </div>
                <div id="main_container" style="padding-bottom: 50px;">
                    <?php echo $content_for_layout ?>
                </div>
                <!-- End #container --> 
            </div>
        </div>

        <div id="footer">
        </div>

        <div class="background_changer dropdown">
            <div class="dropdown" id="colors_pallete"> <a data-toggle="dropdown" data-target="drop4" class="change_color"></a>
                <ul  class="dropdown-menu pull-left" role="menu" aria-labelledby="drop4">
                    <li><a data-color="color_0" class="color_0" tabindex="-1">1</a></li>
                    <li><a data-color="color_1" class="color_1" tabindex="-1">1</a></li>
                    <li><a data-color="color_2" class="color_2" tabindex="-1">2</a></li>
                    <li><a data-color="color_3" class="color_3" tabindex="-1">3</a></li>
                    <li><a data-color="color_4" class="color_4" tabindex="-1">4</a></li>
                    <li><a data-color="color_5" class="color_5" tabindex="-1">5</a></li>
                    <li><a data-color="color_6" class="color_6" tabindex="-1">6</a></li>
                    <li><a data-color="color_7" class="color_7" tabindex="-1">7</a></li>
                    <li><a data-color="color_8" class="color_8" tabindex="-1">8</a></li>
                    <li><a data-color="color_9" class="color_9" tabindex="-1">9</a></li>
                    <li><a data-color="color_10" class="color_10" tabindex="-1">10</a></li>
                    <li><a data-color="color_11" class="color_11" tabindex="-1">10</a></li>
                    <li><a data-color="color_12" class="color_12" tabindex="-1">12</a></li>
                    <li><a data-color="color_13" class="color_13" tabindex="-1">13</a></li>
                    <li><a data-color="color_14" class="color_14" tabindex="-1">14</a></li>
                    <li><a data-color="color_15" class="color_15" tabindex="-1">15</a></li>
                    <li><a data-color="color_16" class="color_16" tabindex="-1">16</a></li>
                    <li><a data-color="color_17" class="color_17" tabindex="-1">17</a></li>
                    <li><a data-color="color_18" class="color_18" tabindex="-1">18</a></li>
                    <li><a data-color="color_19" class="color_19" tabindex="-1">19</a></li>
                    <li><a data-color="color_20" class="color_20" tabindex="-1">20</a></li>
                    <li><a data-color="color_21" class="color_21" tabindex="-1">21</a></li>
                    <li><a data-color="color_22" class="color_22" tabindex="-1">22</a></li>
                    <li><a data-color="color_23" class="color_23" tabindex="-1">23</a></li>
                    <li><a data-color="color_24" class="color_24" tabindex="-1">24</a></li>
                    <li><a data-color="color_25" class="color_25" tabindex="-1">25</a></li>
                </ul>
            </div>
        </div>
        <!-- End .background_changer -->
    </div>
    <!-- /container --> 

    <!-- Le javascript
        ================================================== --> 
    <!-- General scripts --> 
    
    <?php echo $this->Html->script('/tema/js/plugins/enquire.min.js') ?>
    <?php echo $this->Html->script('/tema/js/plugins/jquery.sparkline.min.js') ?> 
    <?php echo $this->Html->script('/tema/js/plugins/excanvas.compiled.js') ?>
    <?php echo $this->Html->script('/tema/js/bootstrap-transition.js') ?>
    <?php echo $this->Html->script('/tema/js/bootstrap-alert.js') ?>
    <?php echo $this->Html->script('/tema/js/bootstrap-modal.js') ?>
    <?php echo $this->Html->script('/tema/js/bootstrap-dropdown.js') ?>
    <?php echo $this->Html->script('/tema/js/bootstrap-scrollspy.js') ?>
    <?php echo $this->Html->script('/tema/js/bootstrap-tab.js') ?>
    <?php echo $this->Html->script('/tema/js/bootstrap-tooltip.js') ?>
    <?php echo $this->Html->script('/tema/js/bootstrap-popover.js') ?>
    <?php echo $this->Html->script('/tema/js/bootstrap-button.js') ?>
    <?php echo $this->Html->script('/tema/js/bootstrap-collapse.js') ?>
    <?php echo $this->Html->script('/tema/js/bootstrap-carousel.js') ?>
    <?php echo $this->Html->script('/tema/js/bootstrap-typeahead.js') ?>
    <?php echo $this->Html->script('/tema/js/bootstrap-affix.js') ?>
    <?php echo $this->Html->script('/tema/js/fileinput.jquery.js') ?>
    <?php echo $this->Html->script('/tema/js/jquery-ui-1.8.23.custom.min.js') ?>
    <?php echo $this->Html->script('/tema/js/jquery.touchdown.js') ?>
    <?php echo $this->Html->script('/tema/js/plugins/jquery.uniform.min.js') ?> 
    <?php echo $this->Html->script('/tema/js/plugins/jquery.tinyscrollbar.min.js') ?> 
    <?php echo $this->Html->script('/tema/js/jnavigate.jquery.min.js') ?> 
    <?php echo $this->Html->script('/tema/js/jquery.touchSwipe.min.js') ?> 
    <?php echo $this->Html->script('/tema/js/plugins/jquery.peity.min.js') ?> 
    <?php echo $this->Html->script('/tema/js/plugins/jquery.maskedinput-1.3') ?>
    <?php echo $this->Html->script('/tema/js/iphone-style-checkboxes') ?>

    <?php echo $this->Html->script('jquery.smartWizard-2.0.min.js'); ?>
    <!-- Flot charts --> 


    <!-- Data tables --> 
    <?php echo $this->Html->script('/tema/js/plugins/datatables/js/jquery.dataTables.js') ?>

    <!-- Task plugin --> 
    <?php echo $this->Html->script('/tema/js/plugins/knockout-2.0.0.js') ?> 

    <!-- Custom made scripts for this template --> 
    <?php echo $this->Html->script('/tema/js/scripts.js') ?>
    <script type="text/javascript">
        $(document).ready(function(){
            $(".maskcpf").mask("99999999999");
        })
    </script>
     <script type="text/javascript">
        $(document).ready(function(){
            $('#next').click(function(e){
                e.preventDefault();
                $('#step2').tab('show');
            })
            $('#next2').click(function(e){
                e.preventDefault();
                $('#step3').tab('show');
            })


            $('button[name="1"]').toggle(function(e){
                e.preventDefault();
                $('input[rel="1"]').attr('checked', true)
                },
                function(e){
                    e.preventDefault();
                    $('input[rel="1"]').attr('checked', false)
                }
            )
            $('button[name="2"]').toggle(function(e){
                e.preventDefault();
                $('input[rel="2"]').attr('checked', true)
            },
            function(e){
                e.preventDefault();
                $('input[rel="2"]').attr('checked', false)
            })

           
        });
    </script>
    <script type="text/javascript">
        /**** Specific JS for this page ****/
        /* Todo Plugin */
        var data = [
            {id: 1, title: "<i class='gicon-gift icon-white'><\/i>Have tea with the Queen", isDone: false},
            {id: 2, title: "<i class='gicon-briefcase icon-white'><\/i>Steal  James Bond car", isDone: true},
            {id: 3, title: "<i class='gicon-heart icon-white'><\/i>Confirm that this template is awesome", isDone: false},
            {id: 4, title: "<i class='gicon-thumbs-up icon-white'><\/i>Nothing", isDone: false},  
            {id: 5, title: "<i class='gicon-fire icon-white'><\/i>Play solitaire", isDone: false}         
        ];


        function Task(data) {
            this.title = ko.observable(data.title);
            this.isDone = ko.observable(data.isDone);
            this.isEditing = ko.observable(data.isEditing);

            this.startEdit = function (event) {
                console.log("editing");
                this.isEditing(true);
            }

            this.updateTask = function (task) {
                this.isEditing(false);
            }
        }

        function TaskListViewModel() {
            // Data
            var self = this;
            self.tasks = ko.observableArray([]);
            self.newTaskText = ko.observable();
            self.incompleteTasks = ko.computed(function() {
                return ko.utils.arrayFilter(self.tasks(), 
                function(task) { 
                    return !task.isDone() && !task._destroy;
                });
            });

            self.completeTasks = ko.computed(function(){
                return ko.utils.arrayFilter(self.tasks(), 
                function(task) { 
                    return task.isDone() && !task._destroy;
                });
            });

            // Operations
            self.addTask = function() {
                self.tasks.push(new Task({ title: this.newTaskText(), isEditing: false }));

                self.newTaskText("");

            };
            self.removeTask = function(task) { self.tasks.destroy(task) };

            self.removeCompleted = function(){
                self.tasks.destroyAll(self.completeTasks());
            };

            /* Load the data */
            var mappedTasks = $.map(data, function(item){
                return new Task(item);
            });

            self.tasks(mappedTasks);      
        }

        ko.applyBindings(new TaskListViewModel());  
        //End Todo Plugin

    </script>
    <?php echo $this->Js->writeBuffer(); ?>
</body>
</html>